/**  
* @ #AcerEntityBase.java Title:  Demo Project Copyright:Copyright©2009 STEE
* @Package: com.stee.entity
* @Description: XXX
* @author: Administrator(8748574@qq.com) 
* @since:  2017-06-09 10:31:52 + File created 
* @history: XXX
*/
package com.stee.entity;

import java.util.Date;

import javax.persistence.Transient;

/**
* @ClassName: AcerEntityBase
* @Description: XXX
* @author: Administrator(8748574@qq.com) 
* @since:  2017-06-09 10:31:52  + File created 
* @history: XXX
*
*/

public abstract class SteeEntityBase implements SteeEntity, Comparable<SteeEntity>, Cloneable {

	private static final long serialVersionUID = 1L;
    public transient boolean selected;
    
    public final String generateSid() {
    	return null;
    }
    
    @Override
    public Object clone() {
	try {
	    return super.clone();
	} catch (CloneNotSupportedException e) {
	    e.printStackTrace();
	}
	return null;
    }
		
	@Override
	@Transient
	public int compareTo(SteeEntity o) {
		return getLabel().compareTo(o.getLabel());
	}

	@Override
	public Integer getSid() {
		return this.getSid();
	}

	public abstract void setSid(Integer sid);

	@Override
	public boolean isSelected() {
		return this.selected;
	}

	@Override
	public void setSelected(boolean selected) {
		this.selected = selected;
	}

	@Override
	public String getName() {
		if (getSid() != null) {
		    return getSid().toString();
		}
		return toString();
	}

	@Override
	public String getLabel() {
		return getName();
	}
	
	public abstract String getUserCreated();

    public abstract void setUserCreated(String userCreated);

    public abstract Date getDateCreated();

    public abstract void setDateCreated(Date dateCreated);

    public abstract String getUserLastModified();

    public abstract void setUserLastModified(String userLastModified);

    public abstract Date getDateLastModified();

    public abstract void setDateLastModified(Date dateLastModified);
}
